
if( SERVER ) then
   
 	AddCSLuaFile( "shared.lua" ) 
 	SWEP.HoldType = "pistol";
 
 end 

 
 SWEP.Base = "ts2_base";
   
 SWEP.Spawnable			= false 
 SWEP.AdminSpawnable		= false 
   
SWEP.ViewModelFlip		= true	

SWEP.Primary.Sound = Sound( "Weapon_P90.Single" );

SWEP.WorldModel = "models/weapons/w_smg_p90.mdl";
SWEP.ViewModel = "models/weapons/v_smg_p90.mdl";

SWEP.PrintName = "FN P-90 PDW";
SWEP.TS2Desc = "Compact, Small, Lightweight, Fast.";


 SWEP.Primary.Recoil			= .3 
 SWEP.Primary.RecoilAdd			= .1
 SWEP.Primary.RecoilMin = .2
 SWEP.Primary.RecoilMax = .5
 
 SWEP.Primary.ViewPunchMul = .5;
 SWEP.Primary.Damage			= 7 
 SWEP.Primary.NumShots		= 1 
 
 SWEP.TS2HoldType = "SMG";

SWEP.Primary.ClipSize = 50;
SWEP.Primary.DefaultClip = 50;
SWEP.Primary.Ammo = "smg1";
SWEP.Primary.Delay = .07;
SWEP.Primary.Automatic = true;
SWEP.Primary.SpreadCone = Vector( 0.03, 0.03, 0.03 );

 SWEP.Primary.IronSightPos = Vector( -6.4, 10.5, -2.0 );
 SWEP.Primary.IronSightAng = Vector( 0.0, 0.0, 0.0 );

SWEP.Primary.HolsteredPos = Vector( 10.8, -5.0, -2.0 );
SWEP.Primary.HolsteredAng = Vector( -5.0, 50.0, 0.0 );

 SWEP.ItemWidth = 2;
 SWEP.ItemHeight = 2;

SWEP.IconCamPos = Vector( 50, -87, 5 ) 
SWEP.IconLookAt = Vector( 0, 0, 0 ) 
SWEP.IconFOV = 13

SWEP.Price = 2000

 function SWEP:HolsterToggle()

self.Owner:ConCommand( "eng_seescope 0\n" );

end

if( CLIENT ) then

SeeSniperScope = false;
local ScopeTexture = surface.GetTextureID( "crosshair" );

function SWEP:DrawHUD()

if( math.floor( self.Primary.PositionMode ) == 1 and math.floor( self.Primary.PositionMul ) == 1 ) then 

if( not SeeSniperScope ) then

RunConsoleCommand( "eng_seescope", "1" );
SeeSniperScope = true;

end

local x = ( ScrW() - 1024 ) * .5;
local y = ( ScrH() - 1024 ) * .5;
local w = 1024;
if( w < ScrW() ) then x = 0; w = ScrW(); end
local h = 1024;
if( h < ScrH() ) then y = 0; h = ScrH(); end

surface.SetTexture( ScopeTexture );
surface.SetDrawColor( 255, 255, 255, 255 );
surface.DrawTexturedRect( x, y, w, h );



end


end

end